Make shapefile and all palm pdb formats deselectable at build time.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 7 May 2006 02:14:35 +0000 (02:14 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 7 May 2006 02:14:35 +0000 (02:14 +0000)
22 files changed:
gpsbabel/cetus.c
gpsbabel/coldsync/pdb.c
gpsbabel/coldsync/util.c
gpsbabel/config.h.in
gpsbabel/configure
gpsbabel/configure.in
gpsbabel/copilot.c
gpsbabel/coto.c
gpsbabel/gcdb.c
gpsbabel/geoniche.c
gpsbabel/gpilots.c
gpsbabel/gpspilot.c
gpsbabel/mag_pdb.c
gpsbabel/magnav.c
gpsbabel/mapopolis.c
gpsbabel/palmdoc.c
gpsbabel/pathaway.c
gpsbabel/quovadis.c
gpsbabel/shape.c
gpsbabel/shapelib/dbfopen.c
gpsbabel/shapelib/shpopen.c
gpsbabel/vecs.c

index d7ba2de61170438bfeccbc19dd1ffc6191ed482e..28042607c9f8f5e5003d797b70bb83c033ab8a93 100644 (file)
@@ -29,6 +29,7 @@
 */
     
 #include "defs.h"
+#if PDBFMTS_ENABLED
 #include "coldsync/palm.h"
 #include "coldsync/pdb.h"
 #
@@ -641,3 +642,4 @@ ff_vecs_t cetus_vecs = {
        cetus_args,
        CET_CHARSET_MS_ANSI, 0  /* CET-REVIEW */
 };
+#endif
index 4a287bd445ed5d90749dd8cefe844bf7f5b15383..abe30cc4e846be3d7fffd7a180e504d7a3e80156 100644 (file)
@@ -6,7 +6,7 @@
  *     You may distribute this file under the terms of the Artistic
  *     License, as specified in the README file.
  *
- * $Id: pdb.c,v 1.10 2006-04-09 02:11:34 robertl Exp $
+ * $Id: pdb.c,v 1.11 2006-05-07 02:14:35 robertl Exp $
  */
 /* XXX - The way zero-length records are handled is a bit of a kludge. They
  * shouldn't normally exist, with the exception of expunged records. But,
@@ -21,6 +21,8 @@
  * with them.
  * Debugging messages should go to 'FILE *pdb_logfile'.
  */
+#include "config.h"
+#if PDBFMTS_ENABLED
 
 #include "cs-config.h"
 #include <stdio.h>
@@ -2029,3 +2031,4 @@ pdb_LoadRecords(int fd,
  * fill-column:        75 ***
  * End: ***
  */
+#endif /* PDBFMTS_DISABLED */
index 07430c3dcde8fec065132736414ddcfc6dbc41b1..6ab67deebc8d601c30e1a7dacd0ce206ecde2a1c 100644 (file)
  * native format, convert them to Palm (big-endian) format, and write
  * them to a ubyte string.
  *
- * $Id: util.c,v 1.5 2006-04-09 02:11:34 robertl Exp $
+ * $Id: util.c,v 1.6 2006-05-07 02:14:35 robertl Exp $
  */
 
+#include "config.h"
 #include "cs-config.h"
+#if PDBFMTS_ENABLED
 #include <stdio.h>
 #include <ctype.h>     /* For isprint() */
 #include <pconn/util.h>
@@ -288,3 +290,4 @@ debug_dump(FILE *outfile, const char *prefix,
  * fill-column:        75 ***
  * End: ***
  */
+#endif
index e20a847d67b6ff7db8810ee96703f40613d9244d..10b5f9b901f55d066166f5930e8a17b49e5dbda3 100644 (file)
@@ -1,6 +1,6 @@
 /* config.h.in.  Generated from configure.in by autoheader.  */
 
-/* "0 for most-used character sets" */
+/* 0 for most-used character sets */
 #undef CET_WANTED
 
 /* Defined if you have libexpat */
@@ -32,3 +32,9 @@
 
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
+
+/* 1 to enable Palm PDB support */
+#undef PDBFMTS_ENABLED
+
+/* 1 to enable shapefile support */
+#undef SHAPELIB_ENABLED
index 12a6797279b60edbd7f4ffa0093962453826bb58..bd7f8d7313d2d1b548231d4acd52489d7dd9ea40 100755 (executable)
@@ -2521,6 +2521,17 @@ _ACEOF
 
 fi
 
+
+cat >>confdefs.h <<\_ACEOF
+#define SHAPELIB_ENABLED 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define PDBFMTS_ENABLED 1
+_ACEOF
+
+
 case "$target" in
     *-*-cygwin* | *-*-mingw32*)
        if test "$with_libusb" = no ; then
@@ -2919,9 +2930,7 @@ fi
 done
 
 
-# coldsync, shapelib, and jeeps  are here just so the target directories are
-# created.
-                                        ac_config_files="$ac_config_files Makefile shapelib/Makefile coldsync/Makefile jeeps/Makefile"
+          ac_config_files="$ac_config_files Makefile"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -3449,9 +3458,6 @@ do
   case "$ac_config_target" in
   # Handling of arguments.
   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-  "shapelib/Makefile" ) CONFIG_FILES="$CONFIG_FILES shapelib/Makefile" ;;
-  "coldsync/Makefile" ) CONFIG_FILES="$CONFIG_FILES coldsync/Makefile" ;;
-  "jeeps/Makefile" ) CONFIG_FILES="$CONFIG_FILES jeeps/Makefile" ;;
   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
index 6047dba6399f095ab41e7e07bf0de698d48b0a6e..52f61da623ebf38367ec27560dc211063f136366 100644 (file)
@@ -24,11 +24,14 @@ AC_ARG_WITH(cet,[--with-cet=(default,all,minimal)],
              cet="$withval", cet="default")
 
 if test "$cet" = "all"; then
-   AC_DEFINE(CET_WANTED, 1, "1 for all character sets")
+   AC_DEFINE(CET_WANTED, 1, [1 for all character sets])
 fi
 if test "$cet" = "default"; then
-   AC_DEFINE(CET_WANTED, 0, "0 for most-used character sets")
+   AC_DEFINE(CET_WANTED, 0, [0 for most-used character sets])
 fi
+
+AC_DEFINE(SHAPELIB_ENABLED, 1, [1 to enable shapefile support])
+AC_DEFINE(PDBFMTS_ENABLED, 1, [1 to enable Palm PDB support])
  
 case "$target" in
     *-*-cygwin* | *-*-mingw32*)
@@ -135,7 +138,5 @@ AC_SUBST(EXPAT_LIB)
 # AC_CHECK_FUNCS([atexit floor localtime_r memmove memset pow select sqrt strchr strcspn strdup strerror strncasecmp strrchr strspn strstr strtol strtoul])
 AC_CHECK_FUNCS([nanosleep sleep])
 
-# coldsync, shapelib, and jeeps  are here just so the target directories are
-# created.
-AC_CONFIG_FILES([Makefile shapelib/Makefile coldsync/Makefile jeeps/Makefile])
+AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
index 879d49a9b59cfe9adb5f267fd619b840448b4fb0..b1b1c903b2b6b3ece9f6892ca1d926ba767cdf10 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "defs.h"
+#if PDBFMTS_ENABLED
 #include "coldsync/palm.h"
 #include "coldsync/pdb.h"
 #include "grtcirc.h"
@@ -202,3 +203,4 @@ ff_vecs_t copilot_vecs = {
        NULL,
        CET_CHARSET_ASCII, 0    /* CET-REVIEW */
 };
+#endif
index 38e5e3ff15d66150384e50ffc5f8056a6187b7f7..c5dfc59f42d8c2f5c17d8f426a403adc0e6de528 100644 (file)
@@ -22,9 +22,9 @@
     
  */
 
-#include <string.h>
 
 #include "defs.h"
+#if PDBFMTS_ENABLED
 #include "csv_util.h"
 #include "coldsync/palm.h"
 #include "coldsync/pdb.h"
@@ -456,3 +456,4 @@ ff_vecs_t coto_vecs = {
        coto_args,
        CET_CHARSET_ASCII, 0    /* CET-REVIEW */
 };
+#endif
index df49107d0e4a66e3abc6e777e80f15598b7395ba..aeb6723f18b66f7f3d267487c8d5e3cad13b2ebc 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "defs.h"
+#if PDBFMTS_ENABLED
 #include "coldsync/palm.h"
 #include "coldsync/pdb.h"
 
@@ -342,3 +343,4 @@ ff_vecs_t gcdb_vecs = {
        NULL,
        CET_CHARSET_ASCII, 0    /* CET-REVIEW */
 };
+#endif
index b374a4e627f76a3d0fb227944ae4e53c0f32d847..79c5737ffa53af000ee1004d3baa856e339c3763 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #include "defs.h"
+#if PDBFMTS_ENABLED
 #include "coldsync/palm.h"
 #include "coldsync/pdb.h"
 #include "jeeps/gpsmath.h"
@@ -814,3 +815,4 @@ ff_vecs_t geoniche_vecs =
        Args,
        CET_CHARSET_MS_ANSI, 0  /* CET-REVIEW */
 };
+#endif
index 6444e651de6aac653da08848babc8742901ff12a..d15430ba45ed068bd29bf56ffdcda7f8730a5fa7 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "defs.h"
+#if PDBFMTS_ENABLED
 #include "coldsync/palm.h"
 #include "coldsync/pdb.h"
 #include "garmin_tables.h"
@@ -460,3 +461,4 @@ ff_vecs_t gpilots_vecs = {
        my_args,
        CET_CHARSET_ASCII, 0    /* CET-REVIEW */
 };
+#endif
index 8a5de41a1611a6d79a255daddf48a35802822612..704f72e8a687449da7e46955260f9610dccdef88 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "defs.h"
+#if PDBFMTS_ENABLED
 #include "coldsync/palm.h"
 #include "coldsync/pdb.h"
 
@@ -258,3 +259,4 @@ ff_vecs_t gpspilot_vecs = {
        gpspilot_args,
        CET_CHARSET_ASCII, 0    /* CET-REVIEW */
 };
+#endif
index 986f9b0ac21d2ebd8d952c4f5a9cb8d50928b094..1b4ff54c729904cc48388a60455804b3e3973af5 100644 (file)
@@ -25,6 +25,7 @@
 #include <math.h>
 
 #include "defs.h"
+#if PDBFMTS_ENABLED
 #include "coldsync/palm.h"
 #include "coldsync/pdb.h"
 #include "jeeps/gpsmath.h"
@@ -239,3 +240,4 @@ ff_vecs_t magpdb_vecs = {
        magpdb_args,
        CET_CHARSET_MS_ANSI, 1  /* CET-REVIEW */
 };
+#endif
index 2d0193d975380d63babaf1294d8e63a6d91d912b..dc9af496157830c39b9c1a4afd2cc902d5af405d 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "defs.h"
+#if PDBFMTS_ENABLED
 #include "coldsync/palm.h"
 #include "coldsync/pdb.h"
 
@@ -274,3 +275,4 @@ ff_vecs_t magnav_vec = {
        NULL,
        CET_CHARSET_ASCII, 0    /* CET-REVIEW */
 };
+#endif
index 2be3bbb1024c66a2e175d0185855f1a526ee8248..151cc7d99c912cd21ac62211fe237a52c1842a47 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "defs.h"
+#if PDBFMTS_ENABLED
 #include "coldsync/palm.h"
 #include "coldsync/pdb.h"
 
@@ -320,3 +321,4 @@ ff_vecs_t mapopolis_vecs = {
        NULL,
        CET_CHARSET_ASCII, 0    /* CET-REVIEW */
 };
+#endif
index 5d1cd679f65396d4c10a4d2fdd4e728348bde898..cea685f501ee6b98ee796a953175fb9f1654d7d3 100644 (file)
@@ -23,6 +23,7 @@
 
 
 #include "defs.h"
+#if PDBFMTS_ENABLED
 #include "jeeps/gpsmath.h"
 #include <ctype.h>
 #include "coldsync/palm.h"
@@ -628,3 +629,4 @@ ff_vecs_t palmdoc_vecs = {
 };
 
 
+#endif
index 326761b16cef446e34c376e55d13bd7a57d66bce..a8119e9a818cdb1b5856efe442ca5900573d2690 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <ctype.h>
 #include "defs.h"
+#if PDBFMTS_ENABLED
 #include "coldsync/palm.h"
 #include "coldsync/pdb.h"
 #include "csv_util.h"
@@ -693,3 +694,4 @@ ff_vecs_t ppdb_vecs = {
        ppdb_args,
        CET_CHARSET_ASCII, 0    /* CET-REVIEW */
 };
+#endif
index 51d7043c5d21e0a8e7f2b317bb644d289e8c37f6..cefa44d8ec8508840ef5f7b4e7b64c5a148a536f 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "quovadis.h"
 
+#if PDBFMTS_ENABLED
 static FILE *file_in;
 static FILE *file_out;
 static const char *out_fname;
@@ -296,3 +297,4 @@ ff_vecs_t quovadis_vecs = {
        quovadis_args,
        CET_CHARSET_ASCII, 0    /* CET-REVIEW */
 };
+#endif
index 5084f58d82ced9f48c2f40df5b8c0c43ba671650..4d4c03d524768dd0222523ddd394e2549d165797 100644 (file)
@@ -22,6 +22,7 @@
 #include "defs.h"
 #include "shapelib/shapefil.h"
 
+#if SHAPELIB_ENABLED
 static SHPHandle ihandle;
 static DBFHandle ihandledb;
 static SHPHandle ohandle;
@@ -312,3 +313,4 @@ ff_vecs_t shape_vecs = {
        shp_args,
        CET_CHARSET_ASCII, 0    /* CET-REVIEW */
 };
+#endif /* SHAPELIB_ENABLED */
index 6d034a5951a9f07050ad8083d836118590764862..8d6bf7f27bce99d435bc1c9775a941288abf3b15 100644 (file)
@@ -1,5 +1,5 @@
 /******************************************************************************
- * $Id: dbfopen.c,v 1.1 2004-09-20 17:21:22 robertl Exp $
+ * $Id: dbfopen.c,v 1.2 2006-05-07 02:14:35 robertl Exp $
  *
  * Project:  Shapelib
  * Purpose:  Implementation of .dbf access API documented in dbf_api.html.
@@ -34,6 +34,9 @@
  ******************************************************************************
  *
  * $Log: not supported by cvs2svn $
+ * Revision 1.1  2004/09/20 17:21:22  robertl
+ * Check in shapelib and experimental prototype of crude shapefile support.
+ *
  * Revision 1.48  2003/03/10 14:51:27  warmerda
  * DBFWrite* calls now return FALSE if they have to truncate
  *
  */
 
 static char rcsid[] = 
-  "$Id: dbfopen.c,v 1.1 2004-09-20 17:21:22 robertl Exp $";
+  "$Id: dbfopen.c,v 1.2 2006-05-07 02:14:35 robertl Exp $";
 
 #include "shapefil.h"
+#include "config.h"
+
+#if SHAPELIB_ENABLED
 
 #include <math.h>
 #include <stdlib.h>
@@ -1493,3 +1499,4 @@ DBFGetFieldIndex(DBFHandle psDBF, const char *pszFieldName)
     }
     return(-1);
 }
+#endif
index 8910eedcc08d26e190d00534f26b7d66d8baf30e..f12c2fbd0839fecf68c52bfca64f75c86e6786c3 100644 (file)
@@ -1,5 +1,5 @@
 /******************************************************************************
- * $Id: shpopen.c,v 1.2 2004-09-27 01:13:58 robertl Exp $
+ * $Id: shpopen.c,v 1.3 2006-05-07 02:14:35 robertl Exp $
  *
  * Project:  Shapelib
  * Purpose:  Implementation of core Shapefile read/write functions.
@@ -34,6 +34,9 @@
  ******************************************************************************
  *
  * $Log: not supported by cvs2svn $
+ * Revision 1.2  2004/09/27 01:13:58  robertl
+ * warning fixes in shapelib.  From Alexander Stohr.
+ *
  * Revision 1.1  2004/09/20 17:21:22  robertl
  * Check in shapelib and experimental prototype of crude shapefile support.
  *
  */
 
 static char rcsid[] = 
-  "$Id: shpopen.c,v 1.2 2004-09-27 01:13:58 robertl Exp $";
+  "$Id: shpopen.c,v 1.3 2006-05-07 02:14:35 robertl Exp $";
 
 #include "shapefil.h"
+#include "config.h"
+#if SHAPELIB_ENABLED
 
 #include <math.h>
 #include <limits.h>
@@ -1867,3 +1872,4 @@ SHPRewindObject( SHPHandle hSHP, SHPObject * psObject )
 
     return bAltered;
 }
+#endif
index 6c7fd87c70764f84760ba847996dcb9a1343cee5..d1fe8d628b2714bf380a8114fbd65f955e263219 100644 (file)
@@ -178,6 +178,7 @@ vecs_t vec_list[] = {
                "Lowrance USR",
                "usr"
        },
+#if PDBFMTS_ENABLED
        {
                &cetus_vecs,
                "cetus",
@@ -202,6 +203,7 @@ vecs_t vec_list[] = {
                "Magellan NAV Companion for Palm/OS", 
                "pdb"
        },
+#endif /* PDBFMTS_ENABLED */
        {
                &garmin_vecs,
                "garmin",
@@ -232,12 +234,14 @@ vecs_t vec_list[] = {
                "TopoMapPro Places File",
                "tmpro"
        },
+#if PDBFMTS_ENABLED
        {
                &gcdb_vecs,
                "gcdb",
                "GeocachingDB for Palm/OS", 
                "pdb"
        },
+#endif
        {
                &tiger_vecs,
                "tiger",
@@ -250,6 +254,7 @@ vecs_t vec_list[] = {
                "EasyGPS binary format",
                ".loc"
        },
+#if PDBFMTS_ENABLED
        {
                &quovadis_vecs,
                "quovadis",
@@ -262,6 +267,7 @@ vecs_t vec_list[] = {
                "GpilotS",
                "pdb"
        },
+#endif
        {
                &saroute_vecs,
                "saroute",
@@ -286,6 +292,7 @@ vecs_t vec_list[] = {
                "KuDaTa PsiTrex text",
                NULL
        },
+#if SHAPELIB_ENABLED
        {
                &shape_vecs,
                "shape",
@@ -298,6 +305,7 @@ vecs_t vec_list[] = {
                "GeoNiche .pdb",
                "pdb"
        },
+#endif
        {
                &gpl_vecs,
                "gpl",
@@ -328,12 +336,14 @@ vecs_t vec_list[] = {
                "HTML Output",
                "html"  
        },
+#if PDBFMTS_ENABLED
        {
                &palmdoc_vecs,
                "palmdoc",
                "PalmDoc Output",
                "pdb"
        },
+#endif
        {
                &netstumbler_vecs,
                "netstumbler",
@@ -418,12 +428,14 @@ vecs_t vec_list[] = {
                "Map&Guide 'TourExchangeFormat' XML",
                "xml"
        },
+#if PDBFMTS_ENABLED
        {
                &ppdb_vecs,
                "pathaway",
                "PathAway Database for Palm/OS",
                "pdb"
        },
+#endif
        {
                &vitosmt_vecs,
                "vitosmt",
@@ -448,12 +460,14 @@ vecs_t vec_list[] = {
                "Motorrad Routenplaner (Map&Guide) .bcr files",
                "bcr"
        },      
+#if PDBFMTS_ENABLED
        {
                &coto_vecs,
                "coto",
                "cotoGPS for Palm/OS", 
                "pdb"
        },
+#endif
        {
                &ignr_vecs,
                "ignrando",
@@ -490,12 +504,14 @@ vecs_t vec_list[] = {
                "Navigon Mobile Navigator .rte files",
                "rte"
        },
+#if PDBFMTS_ENABLED
        {
                &magpdb_vecs,
                "mag_pdb",
                "Map&Guide to Palm/OS exported files (.pdb)",
                "pdb"
        },
+#endif
        {
                &compegps_vecs,
                "compegps",